package eerbaar.shared.internal.tree;

import eerbaar.shared.tree.INode;
import eerbaar.shared.tree.IPayload;

public class Node extends AbstractNode {

    public Node(INode node) {
        super(node.getPayload().copy(), node.getAttributes().copy());

        INode[] children = node.getChildren();
        for (INode n : children) {
            this.addQuiet(n.copy());
        }
    }

    public Node(IPayload payload) {
        super(payload);
    }

    @Override
    public INode copy() {
        return new Node(this);
    }
}
